CXX_FLAGS=`pkg-config --cflags playerc++` `pkg-config --cflags ompl`
INCLUDE_FLAGS=-I/usr/include
LD_FLAGS=`pkg-config --libs playerc++` `pkg-config --libs ompl` -lboost_serialization-mt -lboost_system-mt
CXX=g++
PROGRAM=example0
CPP_FOLDER=../source/
OBJS=example0.o PlayerObject.o PlayerObjectManager.o Person.o PathPlanner.o PlayerProxy.o PeopleCircle.o CollisionRange.o VelocityTuning.o

$(PROGRAM): $(OBJS)
	$(CXX) $(CXX_FLAGS) -o $(PROGRAM) $(OBJS) $(LD_FLAGS)

clean:
	rm -f *.o *.csv $(PROGRAM)

example0.o: $(CPP_FOLDER)example0.cc $(CPP_FOLDER)*.h
	$(CXX) -c $(CPP_FOLDER)example0.cc $(CXX_FLAGS) $(INCLUDE_FLAGS)

PlayerObject.o: $(CPP_FOLDER)PlayerObject.cpp
	$(CXX) -c $(CPP_FOLDER)PlayerObject.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

PlayerObjectManager.o: $(CPP_FOLDER)PlayerObjectManager.cpp
	$(CXX) -c $(CPP_FOLDER)PlayerObjectManager.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

Person.o: $(CPP_FOLDER)Person.cpp
	$(CXX) -c $(CPP_FOLDER)Person.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

PathPlanner.o: $(CPP_FOLDER)PathPlanner.cpp
	$(CXX) -c $(CPP_FOLDER)PathPlanner.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

PlayerProxy.o: $(CPP_FOLDER)PlayerProxy.cpp
	$(CXX) -c $(CPP_FOLDER)PlayerProxy.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

PeopleCircle.o: $(CPP_FOLDER)PeopleCircle.cpp
	$(CXX) -c $(CPP_FOLDER)PeopleCircle.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

CollisionRange.o: $(CPP_FOLDER)CollisionRange.cpp
	$(CXX) -c $(CPP_FOLDER)CollisionRange.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)

VelocityTuning.o: $(CPP_FOLDER)VelocityTuning.cpp
	$(CXX) -c $(CPP_FOLDER)VelocityTuning.cpp $(CXX_FLAGS) $(INCLUDE_FLAGS)
